package com.qidian.mes.om.controller;

import com.qidian.mes.om.service.SysUserService;
import com.qidian.mes.pojo.SysUser;
import com.qidian.mes.util.pojo.MESResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author 戴着假发的程序员
 * @Company 起点编程
 * @Time 2023/11/2 9:32
 * @Description
 */
@RestController
@RequestMapping("/sysUser")
@CrossOrigin
public class SysUserController {
    @Autowired
    private SysUserService userService;

    @PostMapping("/save")
    public MESResult save(@RequestBody SysUser user){
        return userService.save(user);
    }
    @GetMapping("/list")
    public MESResult list(@RequestParam(defaultValue = "1") int page,@RequestParam(defaultValue = "10") int limit,SysUser user){
        return userService.list(page,limit,user);
    }
}
